/*
 * mock_client.hpp
 *
 *  Created on: 04.05.2011
 *      Author: inkooboo
 */

#ifndef _NET_MOCK_CLIENT_HPP_
# define _NET_MOCK_CLIENT_HPP_

# include "mock_network.hpp"

# include <boost/noncopyable.hpp>
# include <boost/signals2.hpp>
# include <boost/shared_ptr.hpp>

class tcp_client_t : boost::noncopyable
{
public:
    void connect(const std::string &channel_name)
    {
        channel_ = mock_network_t::instance().get_channel(channel_name);
    }

    void disconnect()
    {
        channel_.reset();
    }

    void send(const char * data, size_t size)
    {
        channel_->send(data, size);
    }

private:

    boost::shared_ptr<channel_t> channel_;
};

#endif /* _NET_MOCK_CLIENT_HPP_ */
